<?php
	session_start();
	include("../is_login.php");
	include("../function.php");
	$conn = conn();
	$recommend = $_GET["recommend"];
	$cata_id = $_GET['cata_id'];
	$id = $_GET['id'];
	if ($recommend==0) {
		$recommend=1;
	}else{
		$recommend=0;
	}
	$sql = "update article set `recommend` = '$recommend' where id=$id";
	mysqli_query($conn,$sql);
	header("location:list.php?cata_id=$cata_id");
?>